# -*- coding: utf-8 -*-
from sqlalchemy import Column,String,Integer,Text,Binary,Boolean,DateTime,Enum,Float,BigInteger
from adminApp.extensions import db
from .base import BaseModel
import uuid


def gen_id():
    return uuid.uuid4().hex


class HdErrorLog(BaseModel, db.Model):
    '''硬盘故障记录'''
    id = db.Column(db.String(32), default=gen_id, primary_key=True)
    sas_address = Column(String(128))
    model_number = Column(String(128))  # 批号
    manufacturer = Column(String(128))  # 品牌
    firmware_revision = Column(String(128))  # 固件版本
    serial = Column(String(256))  # 磁盘 PN
    guid = Column(String(256))  # 磁盘 SN
    protocol = Column(String(256))  # 磁盘接口 ata scsi
    drive_type = Column(String(256))  # 磁盘类型 ssh sas
    rota = Column(Integer)
    # 备注
    remark = Column(Text)